//
//  GetWithHeader.m
//  WHYNetworkTool
//
//  Created by 王宏洋 on 15/11/7.
//  Copyright © 2015年 王宏洋. All rights reserved.
//

#import "GetWithHeaderAPI.h"
#import "YYKit.h"
#import "YTKNetworkAgent.h"

@implementation GetWithHeaderAPI
{
    NSString *_url;
    NSDictionary *headerDictory;
    NSDictionary *_paramDic;
}

- (id)initWithUrl:(NSString *)url WithParamDic:(NSDictionary *)param
{
    if (self = [super init]) {
        _url = url;
        _paramDic = param;
       
       
    }
    return self;
}



- (id)initWithUrl:(NSString *)url
{
    if (self = [super init]) {
        _url = url;

    }
    return self;
}


- (id)initWithUrl:(NSString *)url header:(NSDictionary *)headerDic
{
    self = [super init];
    if (self) {
        _url = url;
        headerDictory = headerDic;
      
   
    }
    return self;
}

- (NSTimeInterval)requestTimeoutInterval
{
    // 超时设置
    return 15;
}


- (NSDictionary *)requestHeaderFieldValueDictionary
{
    // 获取header 暂未处理
    return nil;
}

- (NSString *)requestUrl
{
    // 获取网址;
    return _url;
}

- (YTKRequestMethod)requestMethod
{
    return YTKRequestMethodGet;
}

//- (void)requestCompleteFilter
//{
////    BaseModel *bsModel = [BaseModel modelWithJSON:self.responseBody];
////
////    
////    NSLog(@"code:%@   msg:%@", bsModel.code,bsModel.msg);
//    [super requestCompleteFilter];
//    [hud hide:YES];
//}
//- (void)requestFailedFilter
//{
//    hud.mode = MBProgressHUDModeText;
//    hud.labelText = @"网络连接出错";
//
//    [hud hide:YES afterDelay:0.5];
//    
//
//}






- (id)requestArgument {
    
    
    return _paramDic;
}




@end
